package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"work1/user/internal/config"
	"work1/user_srv/user"
	"work1/user_srv/userclient"
)

type ServiceContext struct {
	Config  config.Config
	UserSrv user.UserClient
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		UserSrv: userclient.NewUser(zrpc.MustNewClient(c.UserSrv)),
	}
}
